<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css 精灵</title>
  <style>
    .demo {
      width: 1000px;
      height: 1000px;
      background: #ccc url(z1.jpg) no-repeat;
    }

    .demo2 {
      width: 1000px;
      height: 1000px;
      background: #ccc url(z1.jpg) no-repeat -1050px;

    }
  </style>
</head>

<body>
  <div class="demo"></div>
  <div class="demo2"></div>
</body>

</html>